|
|
|
|
|
|
|
A bit forms the basis of all computer knowledge. It can have either of two values: 0 or 1. |
|
|
|
|
|
|
|
|
Let's say you have one bit available to store information. Could you store the number 5 in a single bit? Certainly nota bit can have only one of two values. But what if you wanted to use a bit to indicate if something is true or false? No problemtrue and false are two values. You could also use a bit to indicate if something is on or off, orin a black and white (monochrome) bitmapeach bit could describe a single pixel as either white or black. |
|
|
|
|
|
|
|
|
Clearly bits can be useful, but they don't become really useful until you group them together. |
|
|
|
|
|
|
|
|
The only time you will hear anyone refer to a "nibble" is in cases like this, where someone is trying to teach how binary numbers work. What's a binary number? It's a number that is made up of bits, each of which can take only one of two values (binary). We use nibbles to teach how binary numbers work because it takes up less space than using bytes. You'll see why in a moment. |
|
|
|
|
|
|
|
|
You know that one bit can store only one of two values. What can you do with two bits? |
|
|
|
|
|
|
|
|
Two bits can take the following possible values: |
|
|
|
|
| SECOND BIT | FIRST BIT | | 0 | 0 | | 0 | 1 | | 1 | 0 | | 1 | 1 |
|
|
|
|
|
|
It may seem odd that I placed the second bit first, but I have an ulterior motive. Suffice it to say that I want you to get in the habit of thinking of the first bit as the one on the right. |
|
|
|
|
|
|
|
|
Clearly, two bits give you four possible values. You could use them to count from 0 to 3, or from 1 to 4. You could use them to represent four different colors, for example: |
|
|
|
|
| SECOND BIT | FIRST BIT | | | 0 | 0 | Red | | 0 | 1 | Green | | 1 | 0 | Blue | | 1 | 1 | White |
|
|
|